{extend name="public:base" /}
{block name="breadcrumbs"}
<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="{:url('Index/index')}">首页</a>
							</li>
							<li class="active">用户组管理</li>
						</ul><!-- .breadcrumb -->
					</div>
{/block}					
{block name="content"}
<div class="page-content">
	<div class="page-header">
		<h1>
			当前操作
			<small>
				<i class="icon-double-angle-right"></i>
				添加用户组
			</small>
		</h1>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<form class="form-horizontal"   id="groupadd">
			<input type="hidden" name="id" value="{$editData.id|default=''}">							
				<div class="form-group">
					<label for="title" class="col-sm-3 control-label no-padding-right"> 用户组名： </label>
					<div class="col-sm-9">
						<input type="text" name="title" class="col-xs-10 col-sm-5" value="{$editData.title|default=''}">
					</div>
				</div>				
			
				<div class="form-group">
					<label for="status" class="col-sm-3 control-label no-padding-right">状态： </label>
					<div class="col-sm-9">					
						<label><input name="status" class="ace" type="radio" value="1" {eq name="editData.status" value="1"} checked="checked"{/eq} ><span class="lbl">开启</span></label>
						<label><input name="status" class="ace" type="radio" value="0" {eq name="editData.status" value="0"} checked="checked"{/eq} ><span class="lbl">禁用</span></label>
					</div>
				</div>
				</form>	
				<div class="clearfix">
					<div class="col-md-offset-3 col-md-9">
						<button class="btn btn-info" id="send">
							<i class="icon-ok bigger-110"></i>
							保存
						</button>		
						
					</div>
				</div>				
				
			
		</div>
	</div>
</div>
{/block}
{block name="script"}
	<script type="text/javascript">		
			$('#send').click(function(){				
				$.post(
					"{:url('Group/edit')}",
					$('#groupadd').serializeArray(),
					function(msg){
						layer.msg(msg, {time: 1000, icon:6},function(){
							window.location.href="{:url('Group/index')}";	
						});							
					}
				);
			});
			</script>
{/block}